package crs.web.utilidades;

import java.io.IOException;

import org.springframework.web.multipart.MultipartFile;

public class FicheroSubido {
 
    public int length;
    public byte[] bytes;
    public String name;
    public String type;
    
    public FicheroSubido(MultipartFile imagen) throws IOException{
    	 if (imagen!=null){
	    	 this.length = imagen.getBytes().length;
	    	 this.bytes= imagen.getBytes();
	    	 this.type = imagen.getContentType();
	    	 this.name = imagen.getOriginalFilename();
    	 }
    }
    
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}
	public byte[] getBytes() {
		return bytes;
	}
	public void setBytes(byte[] bytes) {
		this.bytes = bytes;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
    
    
}